Chapter -9 Advance techniques, Using regular lights and shadowing with HDRI lighting

Part 1
1. Your bubbling scene with the new soda came though for your client. Especially this version with the rose stuck in it.
2. You probably notice the scene from last chapter really renders slow to get the quality needed using transparent shadows. As in several hours for a high resolution render. Now how can one maintain that quality and do 300 frames of an animation or 1000 frames without needing a render farm?
3. Well welcome to the Advance section of the course, we are going to show you some ways to really put HDRI in turbo mode when you need it.
4. Lets load this chapters scene or you can load your own scene you did in the last chapter, by adding just a few modifications rendering speed can be greatly increased.
a. This scene really looks very similar to lasts chapters and for the most part it is.
b. Opening up the Environmental Mapping Panel, notice that HDRI lighting shadows are turned off. So how was shadows created in that animation you just saw?
c. Also you see “Use only Envir. Lights” is unchecked
i. those shadows actually came from other lights in the scene.
d. TrueSpace allows you to configure your scene with any number of lights and even use material lights with HDRI if you want.
5. Lets go over this scene with animated soda bubbles using the scene editor and show one way in reducing render time with HDRI for something like an animation or a very large scene.
a. I have a new saved layout for this, I hope you use this new feature, I’ve found it very valuable in saving a given configuration and being able to immediately use the Layout when I need it. This layout can also be found in the Resource files if you want to use it.
b. All lighting of this scene still comes from the HDRI, only the shadow part or component was used with the added regular lights in this scene.
i. You probably already notice the first object in the course object library, called HDRI shadow caster.
(1) This allows shadowing or casting shadows where you want from any direction in your scene using HDRI lighting.
(a) I am going to setup the lights making up the two shadow casters and then do a render.
(b) Notice each shadow caster has two local lights
(i) One light has shadows turned on with a positive intensity, hence where the shadows will come from.
(ii) The other light has shadows turned off which will not contribute to shadowing but the Intensity will be set to the same value but opposite.
1) This is sometimes called a negative light, in this case the negative light will cancel out the lighting of the positive light and only allow the casting of the positive light shadows.
(iii) More on this object in Part 2.
(iv) Lets do a render.
(2) The shadow casting object can cut down the overhead resulting in calculating shadows using HDRI lighting.
(a) For example , in this fizzy CaliSoft soda animation, each frame took an average about 1min 20 seconds on my machine to render.
(i) If I used HDRI lighting with HDRI shadows, each frame renders in about 14 min for me.
1) That’s around 11times times faster using shadow caster for shadows in this case. Higher sample settings will give even more of a dramatic increase in speed.
2) You can test this out by enabling HDRI shadows and checking “use only Environmental lights” which will disable the two shadow casters and use HDRI shadowing instead.
a) Time it against using the two shadow casters.
(ii) Since I can position the Shadow casting objects anywhere I want, I made the shadows of the rose leaf and rose buds show in the scene for a more dramatic effect, while still looking natural, at least I think so.
(b) Another advantage of using HDRI shadow caster or even shadows from regular lights is using the PSD file format.
(i) The shadow component can be separated into a separate layer for post processing.
(ii) With HDRI shadows this is not the case, HDRI lighting shadows are blended in with other layers preventing easy post processing.
(c) You can still use HDRI shadowing with regular light shadows if you want and have both types of shadows rendering.
(d) Go ahead and add a couple of Shadow casting objects to your own scene and try them out. See you in Part 2.
Part 2
6. The HDRI setup scene is loaded.
a. With following Global environment map panel settings:
i. Light Intensity 1.5
ii. Back. Intensity 1
iii. Saturation 0
iv. Sample 10
v. Sampling Angle 0
vi. Envir. Shadows - turned off
vii. Use only Envir. Lights - unchecked
viii. Show Envir. Image - checked
ix. Animate - unchecked
b. Load one Shadow caster object from HDRIcourseOBJ library. Lets go ahead and position it, to about here.
i. Lets go ahead and set the lights in the shader caster.
(a) Go ahead and open up the shader caster in Scene editor.
(b) click on first light to open lighting panel.
(i) Rclick on Set Intensity bar (in lighting panel)
(ii) Set intensity to .5 for the positive light.
(iii) Ensure shadows are enabled.
(iv) Go ahead open up the shadow panel by Rclicking.
1) Go ahead and select ray cast for shadow type (ray tracing shadows),
2) with transparent shadows.
(v) With no light falloff selected.
(c) Go ahead and go to the negative light,
(i) make sure the light intensity is set to the opposite but same value.
(ii) with no shadows selected
(iii) with the same falloff or no falloff (same as positive light)
ii. Lets go ahead and do a render
(1) As you see now, we have shadows now in our scene.
(2) To adjust for darker or lighter shadows raise or lower both the positive light and negative light intensity values (same value but opposite) in the light panels.
(a) Lets go ahead and do that
(i) Lets change the positive light to 1.5 (light intensity)
(ii) The negative light to negative 1.5.
(iii) Render
(iv) See the difference?
1) Convenient way to be able to have dark or lighter shadows.
(b) Map shadows (soft shadows) with ray cast shadows can be combined with different lights in same scene, in addition to using HDRI shadows if you want.
(c) As a note the Bridge may reset the negative light component of this object to zero. Turning Bridge off can help save some time by not having to reset the lights in the HDRI shader caster.
(i) Saved scenes when reloading will also reset negative light of shader caster to zero. So this maybe a little extra work but it can sure pay off when it comes to render times.
(3) Go ahead and Close the Global environment mapping panel.
(4) Load a spotlight by
(a) Opening modeler library light stack and selecting spotlight.
(i) Were going to use this for a simple volumetric.
(b) Place spot light above reflective sphere.
(c) With open light panel set settings
(i) enabling volumetric effect for light,
(ii) intensity to one and linear falloff.
(iii) Go to prospective view and adjust spot light so it will cover the scene from camera viewpoint.
(iv) Go back to camera view.
(5) Open render toolbar, open Foreground shaders stack and select Simple Volumetrics and right click to open Volumetric 0ptions panel.
(a) Set settings as you see:
(i) Fog density - 1.5
(ii) Samples - 2
(iii) Noise amplitude - 0..08
(iv) Noise scale - 0.01
(v) Noise gain - 1
(vi) Source attenuation - 0
(vii) Surface attenuation - 0
(viii) volume attenuation - 0.1
(6) Render
(7) you have a snowy looking scene, later we will animate this.
(a) Go ahead and save this scene.
iii. So using regular lights with HDRI lighting is very useful and even just using shadows from regular lights can be beneficial. TrueSpace allows great flexibility with HDRI.
7. With the ability to add other lights to a HDRI scene, you don’t have to even use HDRI lighting, if you have a custom light setup for like rendering objects, for example a car but want to use HDRI for reflections only, to make that chrome and paint job come alive you can easily do that with or without showing the background.
a. For example I loaded the Bentley car object from TS libraries and modified the materials over time in an animation. Frame zero has the paint job and chrome item with no reflection. By the time the animation reaches 120 frames shininess is reduced to zero and reflections is used instead to bring out a more natural looking specular highlights and the environment.
b. I blur the HDRI so that the reflections are not too sharp but soft looking.
c. Turn off the HDRI lighting by setting Light intensity to zero.
d. Adjust the Background intensity to get a right amount of reflections but not to bright.
8. TS has a great HDRI system with a lot of options to allow great control over how your scene looks and renders. See you in out next topic, animations with HDRI.